<?php 
echo $this->Html->css('../plugins/fancybox/jquery.fancybox-1.3.4');		
echo $this->Html->script('../plugins/fancybox/jquery.mousewheel-3.0.4.pack');
echo $this->Html->script('../plugins/fancybox/jquery.fancybox-1.3.4.pack');
?>
<div class="right">
  <h1><?php echo $product['title']?></h1>
  
  <div class="product-image-wrapper clearfix-after">
    <div class="product-image-large">
    	<a id="fancyproductimg" class="fancy" rel="group" href="<?php echo $this->webroot.'uploaded/Product/large/'.$product['image']?>">
    	<img id="productimg" class="fancy imageFix" widthFix="630" heightFix="400" alt="<?php echo $product['title']?>" src="<?php echo $this->webroot.'uploaded/Product/large/'.$product['image']?>" />
    	</a>
    </div>
    <?php foreach($images as $k=>$v){?>
    	<a class="fancy" rel="group" href="<?php echo $this->webroot.'uploaded/ProductImage/large/'.$v['ProductImage']['image']?>" style="display:none">    	
    	</a>
    <?php }?>
    <div class="product-image-small">
      <?php foreach($images as $k=>$v){if($k>5)break;?>
      <div class="product-image-small-one"><a href="javascript:;" onclick="imgClick('<?php echo $v['ProductImage']['image']?>')"><img class="imageFix" widthFix="87" heightFix="80" alt="" src="<?php echo $this->webroot.'uploaded/ProductImage/thumb/'.$v['ProductImage']['image']?>" /></a></div>
      
      <?php }?>
      
    </div>
  </div>
  
  <div><?php echo $product['description']?></div>
  
  <!-- 
  <div class="align-right"><a href="#"><img alt="" src="<?php echo $this->webroot.'img/bao-kim.png'?>" /></a></div>
   -->
  <h3>Sản phẩm khác</h3>
  <div class="list-image-wrapper clearfix-after">
    <?php foreach($data0 as $k=>$v){ ?>
    <div class="list-image-one">
      <div class="image"><a href="<?php echo $this->Seo->link('/products/detail/'.$v['Product']['id'].'/'.Configure::read('Config.language'))?>"><img class="imageFix" widthFix="134" heightFix="124" alt="<?php echo $v['Product']['title']?>" src="<?php echo $this->webroot.'uploaded/Product/thumb/'.$v['Product']['image']?>" /></a></div>
      <div class="name"><a href="<?php echo $this->Seo->link('/products/detail/'.$v['Product']['id'].'/'.Configure::read('Config.language'))?>"><?php  echo $v['Product']['title']?></a></div>
      
		<div class="clear"></div>
    </div>
    <?php }?>
  </div>
</div>
<script type="text/javascript">
function imgClick(img){
	$('#productimg').attr('src','<?php echo $this->webroot.'uploaded/ProductImage/large/'?>'+img);
	$('#fancyproductimg').attr('href','<?php echo $this->webroot.'uploaded/ProductImage/large/'?>'+img);
}
$("a.fancy").fancybox({
	'width'				: '100%',
	'height'			: '100%',
	'nextClick'			:true, 
	'autoScale'			: false,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
		
	
});
</script>